package com.jinke.api.modules.app.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jinke.api.common.api.CommonResult;
import com.jinke.api.modules.app.model.SysMessage;
import com.jinke.api.modules.app.request.AdminMessageQueryRequest;
import com.jinke.api.modules.app.request.MessageQueryRequest;
import com.jinke.api.modules.app.request.MessageReadRequest;
import com.jinke.api.modules.app.request.SysMessageCreateRequest;
import com.jinke.api.modules.app.response.SysMessageVO;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author macro
 * @since 2024-01-30
 */
public interface SysMessageService extends IService<SysMessage> {
    Page<SysMessageVO> list(MessageQueryRequest request);

    Page<SysMessage> listSysMessage(AdminMessageQueryRequest request);

    Long unread();

    CommonResult create(SysMessageCreateRequest request);

    Integer createOneSysmsg(SysMessageCreateRequest request);

    CommonResult read(MessageReadRequest request);

    CommonResult delete(MessageReadRequest request);

    CommonResult deleteSysMessage(MessageReadRequest request);

    /**
     * 用户反馈发送邮件到邮箱
     *
     * @param
     * @return
     */
    CommonResult sendMailToUs(String htmlContent, List<String> onlineFileUrl, String subject, String email);

    /**
     * 给用户发消息
     * @param userId
     * @param messageId
     * @return
     */
    CommonResult sendMessageToUsers(Integer userId, Integer messageId);

}
